// 模拟商家数据
export const mockShops = () => {
  return Promise.resolve([
    {
      id: 1,
      name: "谜城剧本杀",
      image: "https://example.com/shop1.jpg",
      rating: 4.8,
      district: "朝阳区",
      avgPrice: 128,
      tags: ["环境好", "DM专业", "服装精美", "零食免费"],
      description:
        "专业DM带本，多种主题房间，提供精美服装和道具，给您沉浸式体验。",
    },
    {
      id: 2,
      name: "推理俱乐部",
      image: "https://example.com/shop2.jpg",
      rating: 4.6,
      district: "海淀区",
      avgPrice: 98,
      tags: ["硬核本多", "交通便利", "优惠活动"],
      description: "专注硬核推理本，拥有多名资深DM，定期举办剧本杀比赛。",
    },
    // 更多商家数据...
  ]);
};

// 模拟剧本数据
export const mockScripts = () => {
  return Promise.resolve([
    {
      id: 1,
      title: "古木吟",
      cover: "https://example.com/script1.jpg",
      difficulty: 3,
      minPlayers: 6,
      maxPlayers: 6,
      duration: 4,
      genres: ["情感", "校园", "微恐"],
      description: "一场跨越时空的情感纠葛，校园中的神秘事件，揭开尘封的记忆。",
      availableShops: [1, 2, 3],
    },
    {
      id: 2,
      title: "年轮",
      cover: "https://example.com/script2.jpg",
      difficulty: 4,
      minPlayers: 5,
      maxPlayers: 5,
      duration: 5,
      genres: ["硬核", "还原", "烧脑"],
      description:
        "复杂的家族关系，跨越数十年的谜团，需要玩家抽丝剥茧找出真相。",
      availableShops: [1, 3],
    },
  ]);
};

// 登录
export const loginForm = (formData) => {
  const { username, password, captcha } = formData;
  if (username == "123" && password == "456") {
    return {
      status: 200,
      sessionId: "ABSDSDSDA",
    };
  } else {
    return {
      status: 0,
    };
  }
};

//
export const userInfo = (sessionId) => {
  if (sessionId == "ABSDSDSDA") {
    return {
      status: 200,
      userInfo: {
        username: "123",
      },
    };
  } else {
    return { status: 0 };
  }
};
